import type { Meta, StoryObj } from "@storybook/react";
import React from "react";
import KxWorkerAgeStructurePieChart from "./index";

const meta = {
  title: "饼图/可信工人年龄结构饼图KxWorkerAgeStructurePieChart",
  component: KxWorkerAgeStructurePieChart,
  tags: ["autodocs"],
  argTypes: {},
  decorators: [
    (Story) => (
      <div
        style={{ backgroundColor: "#031857", height: "232px", width: "516px" }}
      >
        <Story />
      </div>
    ),
  ],
} satisfies Meta<typeof KxWorkerAgeStructurePieChart>;

export default meta;
type Story = StoryObj<typeof meta>;

export const basic: Story = {
  args: {
    dataSource: [
      {
        amount: 5,
        name: ">56",
      },
      {
        amount: 15,
        name: "18-29岁",
      },
      {
        amount: 25,
        name: "30-39岁",
      },
      {
        amount: 20,
        name: "40-49岁",
      },
      {
        amount: 35,
        name: "50-56岁",
      },
    ],
  },
};
